//
//  TestViewController.m
//  SwiftDownloader_Example
//
//  Created by zhuangtao on 2019/11/2.
//  Copyright © 2019 CocoaPods. All rights reserved.
//

#import "TestViewController.h"

#import "SwiftDownloader-Swift.h"

@interface TestViewController ()

@property (nonatomic, strong)BridgeSessionManager *manager;

@end

@implementation TestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    SessionConfiguration *config = [[SessionConfiguration alloc] init];
    dispatch_queue_t queue = dispatch_queue_create("com.test.queue", DISPATCH_QUEUE_SERIAL);
    NSString *url = @"http://dldir1.qq.com/qqfile/QQforMac/QQ_V4.2.4.dmg";
    _manager = [[BridgeSessionManager alloc] initWithIdentifier:@"com.test" configuration:config operationQueue:queue];
    
    [[_manager download:url headers:@{} fileName:@"xx"] progress:YES handler:^(BridgeTask * _Nonnull task) {
        NSLog(@"%@",task);
    }];

//    [manager start:@"http://dldir1.qq.com/qqfile/QQforMac/QQ_V4.2.4.dmg"];
    
    
    
    
    
//    NSLog(@"%@---%@",config,manager);
    // Do any additional setup after loading the view.
}


@end
